/*
 * stdnet.h
 *
 *  Created on: Jan 21, 2013
 *      Author: root
 */

#ifndef STDNET_H_
#define STDNET_H_


#define __STDINT_LIMITS
#define __STDC_FORMAT_MACROS
#define _FILE_OFFSET_BITS 64

/*include C std lib header files*/
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <wchar.h>
#include <ctype.h>
#include <stdarg.h>
#include <assert.h>
#include <stddef.h>
#include <math.h>
#include <memory.h>
#include <inttypes.h>
#include <stdint.h>
#include <unistd.h>

/*system call level include files*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/sendfile.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/vfs.h>

#include <time.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include <semaphore.h>
#include <pthread.h>

/*include C++ std lib header files*/
#include <iostream>
#include <fstream>
#include <string>
#include <stack>
#include <queue>
#include <list>
#include <map>

/*comm ver def*/
#define SUCCESS 0
#define FAILURE 1
#define PENDING 2
#define _NULL   0
#define FILE_MAX_PATH 1024
#define GUID_LEN 128
#define CERTIFICATE_LEN 4096
#define DFLT_MIN_CONN_SIZ 100

#ifndef BOOL
#define BOOL int
#define TRUE 1
#define FALSE 0
#endif

#ifndef NULL
#define NULL 0
#endif

typedef unsigned char ubyte;
typedef unsigned short int  uint16_t;
typedef unsigned int  uint32_t;
typedef uint32_t  uint24_t;
typedef unsigned long u_long;
typedef long long int64_t;
typedef unsigned long long uint64_t;

#ifndef _STD_TYPES
#define _STD_TYPES
#define uchar   unsigned char
#define uint    unsigned int
#define ulong   unsigned long int
#endif

/*
* opration log level
*/
enum LogLevel{LOG_ERR = 1, LOG_WARN = 2, LOG_INFO = 3,LOG_DEBUG = 4,LOG_ALL = 5};

/*
*std
*/
using namespace std;

#endif /* STDNET_H_ */
